Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate subroutines for barycentric interpolation into barycentric_utilities_mod.f90 #770

Closed
wants to merge 1 commit into from

Conversation

johnsonbk
Copy link
Collaborator

Description:

Since the barycentric interpolation routines are used by more than one model_mod, this pull request extracts the subroutines into a separate barycentric_utilities_mod.f90.

Fixes issue

Fixes issue #764 Feature request: Barycentric interpolation module.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

Not yet. Documentation changes will be written when the actual model mods are changed.

Tests

I removed the five subroutines stored in the aether_cube_sphere model_mod.f90 and instead imported them from the utilities module:

use barycentric_utils_mod, only: inside_triangle, get_3d_weights, get_barycentric_weights, &
                                 latlon_to_xyz, barycentric_average

I reran quickbuild.sh and everything compiled. After that, I ran model_mod_check and all of the checks passed.

Checklist for merging

Note well: I can edit the changelog and conf.py once the pull request has been reviewed. However, I haven't done so at this time because on past pull requests, the code took long enough to merge that my edits to the changelog and conf.py became obsolete.

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset download instructions included

Instructions for downloading the testing datasets, and the model_mod.f90 used to test this pull request are available on the aether_cube_sphere branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants